package com.ruoyi.tongban.utils;

import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.tongban.service.IFacePersonService;
import com.ruoyi.tongban.service.IFaceSignDetailService;
import com.ruoyi.tongban.service.IFaceSignService;

/**
 * @Description 单例获取been,给socket提供实例
 * @Author caiyanshan
 * @Date 2021/4/8 10:38
 * @Param
 * @Return
 */
public class WebSocketBeenUtils {
  
  private static IFaceSignService faceSignService;
  
  private static IFaceSignDetailService faceSignDetailService;
  
  private static IFacePersonService facePersonService;
  
  public static IFacePersonService getFacePersonService(){
    if(facePersonService == null){
      facePersonService = SpringUtils.getBean(IFacePersonService.class);
    }
    return facePersonService;
  }
  
  public static IFaceSignService getFaceSignService(){
    if(faceSignService == null){
      faceSignService = SpringUtils.getBean(IFaceSignService.class);
    }
    return faceSignService;
  }
  
  public static IFaceSignDetailService getFaceSignDetailService(){
    if(faceSignDetailService == null){
      faceSignDetailService = SpringUtils.getBean(IFaceSignDetailService.class);
    }
    return faceSignDetailService;
  }
}
